package com.zhongkun.datahome.service.manager;

import com.zhongkun.datahome.common.utils.spring.SpringUtils;
import com.zhongkun.datahome.service.service.ICustomerBaseService;
import com.zhongkun.datahome.service.service.ICustomerHouseService;
import lombok.extern.slf4j.Slf4j;

import java.util.TimerTask;

/**
 * 异步工厂（产生任务用）
 *
 * @author ruoyi
 */
@Slf4j
public class ServiceAsyncFactory {

    public static TimerTask createCustomerMiniProgram(final Long customerHouseId) {
        return new TimerTask() {
            @Override
            public void run() {
                SpringUtils.getBean(ICustomerHouseService.class).updateCustomerHouseMiniProgram(customerHouseId);
            }
        };
    }
}
